<?php echo $this->render('/manage/header.phtml');?>
    <script type="text/javascript"
src="<?php echo APPLICATION_PUBLIC_PATH;?>/js/admin/articleList.js"></script>
<style type="css"></style>
</head>
<body>
	<div id="body-wrapper">
		<?php echo $this->render('/manage/sidebar.phtml');?>
		<div id="main-content">
			<h2>模特加盟列表</h2>
			<div class="clear"></div>
			<div class="content-box">
				<div class="content-box-header">
					<h3>Content box</h3>
					<div class="clear"></div>
				</div>
				<div class="content-box-content">
					<div class="tab-content default-tab" id="tab1">
						<table>
							<thead>
								<tr>
									<th width="10%">编号</th>
									<th width="10%">姓名</th>
									<th width="20%">国籍</th>
									<th width="20%">照片</th>
									<th width="10%">电话</th>
									<th width="10%">邮箱</th>
									<th width="20%">操作</th>
								</tr>
							</thead>
							<tbody>
								<?php
								$modelJoinTable = Zend_Registry::get('database')->modeljoin;
								foreach ($this->modelList as $key => $value) {
								?>
								<tr>
									<td><?php echo $value[$modelJoinTable->id];?></td>
									<td><?php echo $value[$modelJoinTable->name];?></td>
									<td><?php echo $value[$modelJoinTable->country];?></td>
									<td><?php $photos = unserialize($value[$modelJoinTable->upload]); 
									echo empty($photos) ? '没有' : '有';?></td>
									<td><?php echo $value[$modelJoinTable->telephone];?></td>
									<td><?php echo $value[$modelJoinTable->email];?></td>
									<td><a href="<?php echo APPLICATION_ACTION_PATH;?>/manage/model-join-detail/id/<?php echo $value[$modelJoinTable->id];?>">查看</a> <a class="deleteModel" href="<?php echo APPLICATION_ACTION_PATH;?>/manage/delete-model-join/id/<?php echo $value[$modelJoinTable->id];?>">删除</a></td>
								</tr>
								<?php }?>
							</tbody>
							<tfoot>
								<tr>
									<td colspan="6">
									<div class="pagination">
										<a
										href="<?php echo APPLICATION_ACTION_PATH;?>/manage/model-join/page/1"
										title="First Page">&laquo; First</a><a
										href="<?php echo APPLICATION_ACTION_PATH;?>/manage/model-join/page/<?php echo $this->page - 1;?>"
										title="Previous Page">&laquo; Previous</a>
										<?php if ($this->page < 6) {
										?>
										<?php for ($i = 1; $i < 11; $i++) {
										?>
										<?php
											if ($i == $this->page) {
												$style = " current";
											} else {
												$style = "";
											}
										?>
										<a
										href="<?php echo APPLICATION_ACTION_PATH;?>/manage/model-join/page/<?php echo $i;?>"
										class="number<?php echo $style;?>"><?php echo $i;?></a>
										<?php
											if ($i == $this->total) {
												break;
											}
										?>
										<?php }?>
										<?php } else {?>
										<?php for ($i = $this->page - 4; $i < $this->page + 6; $i++) {
										?>
										<?php
											if ($i == $this->page) {
												$style = " current";
											} else {
												$style = "";
											}
										?>
										<a
										href="<?php echo APPLICATION_ACTION_PATH;?>/manage/model-join/page/<?php echo $i;?>"
										class="number<?php echo $style;?>"><?php echo $i;?></a>
										<?php
											if ($i == $this->total) {
												break;
											}
										?>
										<?php }?>
										<?php }?>
										<a
										href="<?php echo APPLICATION_ACTION_PATH;?>/manage/model-join/page/<?php echo $this->page + 1;?>"
										title="Next Page">Next &raquo;</a><a
										href="<?php echo APPLICATION_ACTION_PATH;?>/manage/model-join/page/<?php echo $this->total;?>"
										title="Last Page">Last &raquo;</a>
									</div><div class="clear"></div></td>
								</tr>
							</tfoot>
						</table>
					</div>
				</div>
			</div>
			<div class="clear"></div>
			<?php echo $this->render('/manage/footer.phtml');?>
		</div>
	</div>
	<script type="text/javascript">
    $('.deleteModel').click(function(){
        if (confirm("确定要删除吗？")) {
            return true;
        } else {
            return false;
        }
    });
	</script>
</body>
</html>